rtc: s35390a: implement reset routine as suggested by the reference
authorUwe Kleine-König <uwe@kleine-koenig.org>
Sat, 2 Jul 2016 15:28:09 +0000 (17:28 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 7 Oct 2016 01:11:50 +0000 (01:11 +0000)
commitf7d26adb163dedadcf10055b57b4fc2dade94916
tree952ce8dbae9a8fae076d46efca513ab96f137f41
parentbe997236a57331f711a862bdc97ae538a5f69ed6
rtc: s35390a: implement reset routine as suggested by the reference

There were two deviations from the reference manual: you have to wait
half a second when POC is active and you might have to repeat
initialization when POC or BLD are still set after the sequence.

Note however that as POC and BLD are cleared by read the driver might
not be able to detect that a reset is necessary. I don't have a good
idea how to fix this.

Additionally report the value read from STATUS1 to the caller. This
prepares the next patch.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name rtc-s35390a-implement-reset-routine-as-suggested-by-.patch
drivers/rtc/rtc-s35390a.c